#ifndef __WH_LTE_DRIVER_H__
#define __WH_LTE_DRIVER_H__

#include <stdint.h>
#include <stdbool.h>
#include "cmsis_os.h"

#define MODEL_BUFF_SIZE	512

#define MODEL_TYPE	"WH-LTE-7S0"

#define MODEL_ECHO_SET_CMD	"AT+E="
#define MODEL_ENTER_CMD_CMD	"+++"
#define MODEL_ENTER_BYPS_CMD	"AT+ENTM\r\n"
#define MODEL_SETSOCKB_TCP_LONGCNT	"AT+SOCKBSL=LONG\r\n"

typedef void (*uart_snd)(const char *data, uint32_t length);

void InitModelDriver(void);
osMessageQId getModel4GControlMsgQueneID(void);

void setModel4GBuff(uint8_t *data, uint32_t length);
uint32_t getModel4GBuffFilledLength(void);
uint8_t* getModel4GBuff(void);

bool checkModelStartupStatus(const char *in);

void setModelEnterCmdStatus(bool bCmdMode, uint32_t bStep);

void setModelEchoStatus(bool bEchoOn);

void setModelStartupStatus(bool bStartDone);
bool getModelStartupDone(void);

void setModelConfigStatus(bool cfgDone);
bool getModelStartupDone(void);

void setSockB(void);

typedef enum _configstep
{
	eCheckModel4GStartup,
	eEchoModeOff,
	eEnterCmdMode,
	eSetServerB,
	eEnterByPassMode,
	
	eConfigDone
	
} Model4GConfigStep;

#endif
